<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<link href="style.css" type="text/css" rel="stylesheet">
<title>VEXP2PD—Approximation to the Exponential 2^x of Packed Double-Precision Floating-Point Values with Less Than 2^-23 Relative Error </title></head>
<body>
<h1>VEXP2PD—Approximation to the Exponential 2^x of Packed Double-Precision Floating-Point Values with Less Than 2^-23 Relative Error</h1>
<table>
<tr>
<th>Opcode/Instruction</th>
<th>Op /En</th>
<th>64/32 bit Mode Support</th>
<th>CPUID Feature Flag</th>
<th>Description</th></tr>
<tr>
<td>
<p>EVEX.512.66.0F38.W1 C8 /r</p>
<p>VEXP2PD zmm1 {k1}{z}, zmm2/m512/m64bcst {sae}</p></td>
<td>FV</td>
<td>V/V</td>
<td>AVX512ER</td>
<td>Computes approximations to the exponential 2^x (with less than 2^-23 of maximum relative error) of the packed double-precision floating-point values from zmm2/m512/m64bcst and stores the floating-point result in zmm1with writemask k1.</td></tr></table>
<h3>Instruction Operand Encoding</h3>
<table>
<tr>
<td>Op/En</td>
<td>Operand 1</td>
<td>Operand 2</td>
<td>Operand 3</td>
<td>Operand 4</td></tr>
<tr>
<td>FV</td>
<td>ModRM:reg (r, w)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td>
<td>NA</td></tr></table>
<p><strong>Description</strong></p>
<p>Computes the approximate base-2 exponential evaluation of the double-precision floating-point values in the source operand (the second operand) and stores the results to the destination operand (the first operand) using the writemask k1. The approximate base-2 exponential is evaluated with less than 2^-23 of relative error.</p>
<p>Denormal input values are treated as zeros and do not signal #DE, irrespective of MXCSR.DAZ. Denormal results are flushed to zeros and do not signal #UE, irrespective of MXCSR.FZ.</p>
<p>The source operand is a ZMM register, a 512-bit memory location or a 512-bit vector broadcasted from a 64-bit memory location. The destination operand is a ZMM register, conditionally updated using writemask k1.</p>
<p>EVEX.vvvv is reserved and must be 1111b otherwise instructions will #UD.</p>
<p>A numerically exact implementation of VEXP2xx can be found at https://software.intel.com/en-us/articles/refer-ence-implementations-for-IA-approximation-instructions-vrcp14-vrsqrt14-vrcp28-vrsqrt28-vexp2.</p>
<p><strong>Operation</strong></p>
<p><strong>VEXP2PD</strong></p>
<p>(KL, VL) = (8, 512)</p>
<p>FOR j (cid:197) 0 TO KL-1</p>
<p>i (cid:197) j * 64</p>
<p>IF k1[j] OR *no writemask* THEN</p>
<p>IF (EVEX.b = 1) AND (SRC *is memory*)</p>
<p>THEN DEST[i+63:i] (cid:197) EXP2_23_DP(SRC[63:0])</p>
<p>ELSE DEST[i+63:i] (cid:197) EXP2_23_DP(SRC[i+63:i])</p>
<p>FI;</p>
<p>ELSE</p>
<p>IF *merging-masking*</p>
<p>; merging-masking</p>
<p>THEN *DEST[i+63:i] remains unchanged*</p>
<p>ELSE</p>
<p>; zeroing-masking</p>
<p>DEST[i+63:i] (cid:197) 0</p>
<p>FI;</p>
<p>FI;</p>
<p>ENDFOR;</p>
<h3>Table 5-4. Special Values Behavior</h3>
<table>
<tr>
<th>Source Input</th>
<th>Result</th>
<th>Comments</th></tr>
<tr>
<td>NaN</td>
<td>QNaN(src)</td>
<td>If (SRC = SNaN) then #I</td></tr>
<tr>
<td>+∞</td>
<td>+∞</td>
<td></td></tr>
<tr>
<td>+/-0</td>
<td>1.0f</td>
<td><em>Exact result</em></td></tr>
<tr>
<td>-∞</td>
<td>+0.0f</td>
<td></td></tr>
<tr>
<td>Integral value N</td>
<td>2^ (N)</td>
<td><em>Exact result</em></td></tr></table>
<p><strong>Intel C/C++ Compiler Intrinsic Equivalent</strong></p>
<p>VEXP2PD __m512d _mm512_exp2a23_round_pd (__m512d a, int sae);</p>
<p>VEXP2PD __m512d _mm512_mask_exp2a23_round_pd (__m512d a, __mmask8 m, __m512d b, int sae);</p>
<p>VEXP2PD __m512d _mm512_maskz_exp2a23_round_pd ( __mmask8 m, __m512d b, int sae);</p>
<p><strong>SIMD Floating-Point Exceptions</strong></p>
<p>Invalid (if SNaN input), Overflow</p>
<p><strong>Other Exceptions</strong></p>
<p>See Exceptions Type E2.</p></body></html>